// student.h
#ifndef STUDENT_H
#define STUDENT_H

#include <stdio.h>
#include <string.h>

#define MAX_STUDENTS 100
#define MAX_SUBJECTS 10

typedef struct {
    char name[50];
    float score;
} Subject;

typedef struct {
    int id;
    char name[50];
    int age;
    Subject *subjects;  
    int subject_count;
} Student;

typedef struct {
    Student students[MAX_STUDENTS];
    int student_count;
    char filename[100];
} School;

void showMenu(School *school);
void addStudent(School *school);
void showAllStudents(School *school);
void saveStudentsToFile(School *school, const char* filename);
void clearInputBuffer(void);
int areSubjectsTheSame(const char* subject1, const char* subject2);
void sortStudentsByScore(School *school, const char *subjectName);
void querySubjectRank(School *school);
void deleteStudent(School *school);
void modifyStudent(School *school);
void loadStudentsFromFile(School *school, const char* filename);
void enterSubjectScore(School *school); 
void printStudentsWithMoreThanTwoFailingSubjects(School *school);
void freeSchoolMemory(School* school);

#endif
